CSS Master by Tiffany B. Brown
Author:Tiffany B. Brown [Brown, Tiffany B.]
Language: eng
Format: epub, mobi
ISBN: 9780994182623
Publisher: SitePoint Pty. Ltd.
Published: 2015-08-16T04:00:00+00:00
Note: Lacking confidence with JavaScript?
If any of that went over your head, don’t worry. Web Platform Docs explains these concepts in its guide to programming basics, or pick up Darren Jones’ JavaScript: Novice to Ninja. Using jQuery? Try the jQuery Learning Center.
Now let’s look at our CSS. It’s only a few lines long:
body { background: #fcf; transition: 5s; } .change { background: #0cf; }
Here we’ve defined a starting background color for our body element, and a transition. We’ve also defined a .change class, which has a different value for background. When our event handler runs, it will add the change class to our body element. This will trigger a transition from the original background color to the one defined in the .change declaration block, as shown in Figure 5.3.
If you want a transition to work in both directions—for example, when the class is both added and removed—you should add it to whichever declaration block is your start state. We’ve done that here by including the transition property in the body declaration block. If we moved the transition to the change class, our transition would only work when change was added to our body element, but not when it was removed.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9917)
The Mikado Method by Ola Ellnestam Daniel Brolund(9780)
Dependency Injection in .NET by Mark Seemann(9340)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7783)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Svelte with Test-Driven Development by Daniel Irvine(7190)
Test-Driven Development with PHP 8 by Rainier Sarabia(6915)
Layered Design for Ruby on Rails Applications by Dementyev Vladimir;(6784)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6536)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6419)
Web Development with Django by Ben Shaw Saurabh Badhwar(6246)
React Application Architecture for Production by Alan Alickovic(5973)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5809)
Kotlin in Action by Dmitry Jemerov(5067)
Audition by Ryu Murakami(4584)
Software Architecture for Web Developers by Mihaela Roxana Ghidersa(4465)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4319)
Accelerating Server-Side Development with Fastify by Manuel Spigolon Maksim Sinik & Matteo Collina(4311)
Functional Programming in JavaScript by Mantyla Dan(4040)
